#include<iostream>
#include<vector>
#include <climits>
using namespace std;
int main()
{
    int n = 0, x = 0;
    cin >> n >> x;
    vector<int> a(n);
    for (int i = 0; i < n; i++) cin >> a[i];

    int sum = 0;
    int minsize = INT_MAX;
    int retleft = -1, retright = -1;
    for (int left = 0, right = 0; right < n; right++)
    {
        sum += a[right];
        while (sum >= x)
        {
            if (right - left + 1 < minsize)
            {
                retleft = left + 1;
                retright = right + 1;
                minsize = right - left + 1;
            }
            sum -= a[left++];
        }
    }
    cout << retleft << " " << retright << endl;
    return 0;
}